package org.viettan.android.main.activities.radio;

import org.viettan.android.main.services.RadioService;

import roboguice.activity.RoboActivity;
import android.app.PendingIntent;
import android.content.Intent;
import android.os.Bundle;

/**
 * This is a dummy activity whose sole purpose is to bring the {@link RadioEpisodeActivity} to the
 * front of the stack. This hack is needed only so that the {@link RadioService} can call this, as
 * the {@link PendingIntent} does not support the {@link Intent#FLAG_ACTIVITY_REORDER_TO_FRONT}
 * flag.
 *
 * @see <a
 *      href="https://groups.google.com/forum/?fromgroups#!msg/android-developers/DibTfwnfZ-s/5HrfVnoKAaMJ">Google
 *      Group discussion</a>
 * 
 */
public class RadioEpisodeReorderActivity extends RoboActivity {
    @Override
    public void onCreate(Bundle savedInstanceState) {
	super.onCreate(savedInstanceState);
	Intent radioEpisodeIntent = new Intent(this, RadioEpisodeActivity.class);
	radioEpisodeIntent.setFlags(Intent.FLAG_ACTIVITY_REORDER_TO_FRONT);
	startActivity(radioEpisodeIntent);
    }
}
